package cn.miju.admin.framework.model;

import cn.miju.database.entity.SysUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * <pre>
 * 分页参数
 * </pre>
 *
 * @author zhuming
 * @version 1.0.0
 * @since 2023-03-18 9:46
 */
@Data
@ApiModel
public class BasePage {
    /**
     * 页码数
     */
    @ApiModelProperty(value = "页码数", required = true)
    @NotNull(message = "传入页码数不能为空")
    @Min(value = 1, message = "传入页码数不能小于1")
    private Integer page;
    /**
     * 每页记录数
     */
    @ApiModelProperty(value = "每页记录数", required = true)
    @NotNull(message = "传入每页记录数不能为空")
    @Min(value = 1, message = "传入每页记录数不能小于1")
    private Integer pageSize;
    /**
     * 登录用户信息
     */
    @ApiModelProperty(hidden = true)
    private SysUser loginUser;
}
